package com.mozq.dubbo.demo_01_provider;

import com.mozq.dubbo.demo_01_interface.DemoService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

/**
 * @author: xiechangzhou 2020/1/17 16:30
 */
public class Container {
    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("provider.xml");
        context.start();
        System.out.println("dubbo服务已经启动了...");
        DemoService demoService = (DemoService) context.getBean("demoService");
        String result = demoService.sayHello("提供者");
        System.out.println(result);
        System.in.read();
    }
}
